<template>
  <div>
    <x-header title="公告详情"></x-header>
    <group :title="noticy.title">
      <div v-html='noticy.content' ></div>
    </group>
  </div>
</template>

<script>
import { XHeader, Group, XTextarea } from 'vux'
import { GetDetail } from '@/api/notice'

export default {
  components: {
    XHeader,
    Group,
    XTextarea
  },
  data() {
    return {
      noticy: {
        title: '',
        content: ''
      }
    }
  },
  created() {
    this.getDetail(this.$route.query.id)
  },
  methods: {
    getDetail(id) {
      var _this = this
      var a = { id: id }
      GetDetail(a).then(result => {
        _this.noticy = result.data
      })
    }
  },
  activated() {
  }
}
</script>

<style lang="css" scoped>
  pre{
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
  }
</style>
